# -*- encoding: utf-8 -*-
'''
@File    :   7.py
@Time    :   2022/11/09 12:43:33
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib
import random

# 7  随机生成20个学生的成绩; 判断这20个学生成绩的等级; 用函数来实现;  
#     A---成绩>=90;  
#     B-->成绩在 [80,90)
#     C-->成绩在 [70,80)
#     D-->成绩<70

def myfunc(arg1):
    for i in arg1:
        if(i>=90):
            print("A",end=",")
        elif(i>=80 and i<90):
            print("B",end=",")
        elif(i>=70 and i<80):
            print("C",end=",")
        else:
            print("D",end=",")
list1 = []
for i in range(20):
    list1.append(random.randint(0,100))

myfunc(list1)